import {Platform, Dimensions, StatusBar} from 'react-native';

const X_WIDTH = 375;
const X_HEIGHT = 812;

export const {height: windowHeight, width: windowWidth} = Dimensions.get('window');
export const STATUS_BAR_HEIGHT = Platform.OS === 'ios' ? 0 : StatusBar.currentHeight;
export const NAV_BAR_HEIGHT_IOS = 44;
export const NAV_BAR_HEIGHT_ANDROID = 50;
export const isIPhoneX =
    Platform.OS === 'ios' &&
    ((windowHeight === X_HEIGHT && windowWidth === X_WIDTH) ||
        (windowHeight === X_WIDTH && windowWidth === X_HEIGHT));

export const hasNotch = isIPhoneX;
export const hasInsetBottom = isIPhoneX;
export const notchDiff = 44 - 20;
export const webhost = 44 - 20;


export const isAndroid = () => {
    if (Platform.OS === 'android')
        return true;
    return false;
};

export const isIOS = () => {
    if (Platform.OS === 'ios')
        return true;
    return false;
};
const platform = Platform.OS;
export {
    platform,
}


